package com.qzsoft.system.modules.permission.deptJob.dao;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qzsoft.system.modules.permission.deptJob.dto.SysDeptJobDTO;
import com.qzsoft.system.repository.sys.entity.SysDeptEntity;
import com.qzsoft.system.repository.sys.entity.SysDeptJobEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * (SysDeptJob)表数据库访问层
 *
 * @author yzz
 * @since 2020-07-30 09:42:35
 */
@Mapper
public interface SysDeptJobMapper extends BaseMapper<SysDeptJobEntity> {

    IPage<SysDeptJobDTO> selectDTOList(IPage<SysDeptJobDTO> page, @Param("ew") Wrapper<SysDeptJobDTO> queryWrapper);

    List<SysDeptJobDTO> selectDTOList(@Param("ew") Wrapper<SysDeptJobDTO> queryWrapper);

    int updateBatchByDeptCode(@Param("list") List<SysDeptEntity> list);

    Integer selectMaxSort(String deptId);
    SysDeptJobEntity selectMaxOrMin(Map<String, Object> map);

    void updateSort(Map<String, Object> map);

    void updateSortByCondition(Map<String, Object> map);

    SysDeptEntity getMoveToEntity(Map<String, Object> hashmap);
}